package cn.nawang.ebeim.api.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.nawang.ebeim.api.comm.PageList;
import cn.nawang.ebeim.api.comm.Pages;
import cn.nawang.ebeim.api.domain.SalesPackage;
import cn.nawang.ebeim.api.repository.SalesPackageRepository;
import cn.nawang.ebeim.api.repository.impl.SalesPackageRepositoryImpl;
import cn.nawang.ebeim.api.service.SalesPackageService;

/**
 * @ClassName: SalesPackageServiceImpl
 * @Description: TODO
 * @author fanyb
 * @date Nov 4, 2015 9:21:33 AM
 * @version v1.0
 */
@Service("salesPackageService")
public class SalesPackageServiceImpl implements SalesPackageService{

  @Autowired
  private SalesPackageRepositoryImpl salesPackageRepositoryImpl;
  
  @Autowired
  private SalesPackageRepository salesPackageRepository;
  
  @Override
  public PageList findPageList(Pages pages) {
    return salesPackageRepositoryImpl.findAllByPaging(pages);
  }

  @Override
  public SalesPackage findOne(String id) {
    return salesPackageRepository.findOne(id);
  }

  @Override
  public SalesPackage findByCustomerId(String customerId) {
    return salesPackageRepositoryImpl.findByCustomerId(customerId);
  }

}
